App({
  globalData: {
    hostAddress:"http://localhost",     //服务主机地址数据
    themeIndex:2,                       //主题索引
    themeList:[                         //主题css名称列表
      'theme-spring',
      'theme-summer',
      'theme-autumn',
      'theme-winter',
      'theme-all'
    ],
    indexPageArttPicUrl:'',     //主页面展示图片地址
    shopcart:[],                //购物车列表
    clientInfo:undefined,       //用户信息
    searchKeyword:undefined     //搜索关键词
  },
  //isLogined 检测登录函数
  isLogined(){
    //检测是否登录，否则跳转登录页面     
    if(this.globalData.clientInfo!=undefined) return;
    wx.navigateTo({
      url: '/pages/account/account',
    });
  },
  //pinia 网络请求函数
  pinia(action,paramsObj,FunctionResolve){
    //封装的请求函数，封装了请求的role参数
    //action是请求的行为参数,paramsObj是行为依赖的参数
    var host = this.globalData.hostAddress;
    paramsObj['action'] = action,
    paramsObj['role'] = 'Customer',
    wx.request({
      url:host+'/gallaryMarket/interface/Filter.php',
      method: 'POST',
      header: {
        "Content-Type": "application/x-www-form-urlencoded"
      },
      data: paramsObj,
      success:FunctionResolve
    });
  }
})
